import request from '@/api/request'

export function productsByPage(start = 1, limit = 10, data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method: 'post',
    data
  })
}

export function switchNewStatus(data) { // 最新
  return request({
    url: `/lejuAdmin/product/switchNewStatus`,
    method: 'post',
    data
  })
}
export function switchVerifyStatus(data) { // 审核
  return request({
    url: `lejuAdmin/product/switchVerifyStatus`,
    method: 'post',
    data
  })
}

export function switchPublishStatus(data) { // 发布
  return request({
    url: `/lejuAdmin/product/switchPublishStatus`,
    method: 'post',
    data
  })
}

export function switchRecommandStatus(data) { // 推荐
  return request({
    url: `/lejuAdmin/product/switchRecommandStatus`,
    method: 'post',
    data
  })
}
export function del(productId) { // 删除
  return request({
    url: `/lejuAdmin/product/del/${productId}`,
    method: 'DELETE'
  })
}
